package com.wn.www.carbeauty.controller;

import com.wn.www.carbeauty.service.IServicesService;
import com.wn.www.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chan
 * @since 2025-04-11
 */
@RestController
@RequestMapping("/services")
public class ServicesController {

    @Autowired
    private IServicesService servicesService;

    @GetMapping("/list")
    public Result servicesList(){
        return Result.ok(servicesService.servicesList());
    }

    @GetMapping("/{id}")
    public Result servicesById(@PathVariable("id")Integer id){
        return Result.ok(servicesService.servicesById(id));
    }

}
